package cn.edu.scau.cmi.dengzhengyu.composite;

import java.util.HashSet;
import java.util.Set;

import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBaseIterators.ChildrenIterator;

public abstract class ConsistentComponent {
	
	ConsistentComponent parent;
	Set<ConsistentComponent> children = new HashSet<ConsistentComponent>();
	
	public abstract String doSomething();
	public abstract boolean addChildren(ConsistentComponent component);
	public abstract boolean removeChildren(ConsistentComponent component);
	public abstract Set<ConsistentComponent> getChildren();
	
	public void setParent(ConsistentComponent parent) {
		this.parent = parent;
	}
	
	public ConsistentComponent getParent() {
		return this.parent;
	}
}
